/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.LinkedList;

/**
 * <p>Project: javaseapp - LinkedList1
 * <p>Powered by webrx On 2021-08-10 10:37:27
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 16
 */
public class LinkedList1 {
    public static void main(String[] args) {
        LinkedList<String> linked = new LinkedList<>();
        linked.add("java");
        linked.add(linked.size(), "javascript");
        linked.addFirst("php");
        linked.addLast("python");
        //linked.clear();

        linked.remove();
        linked.remove("python");

        System.out.println(linked.get(1));

        //linked.contains()

        System.out.println(linked.size());

        linked.forEach(System.out::println);

    }
}
